qt5base: introduce build config options, starting with support for inotify
authorMirko Vogt <[email protected]>
Mon, 9 Aug 2021 15:21:01 +0000 (15:21 +0000)
committerMirko Vogt <[email protected]>
Thu, 22 May 2025 10:58:15 +0000 (10:58 +0000)
frameworks/qt5/qt5base/Config.in [new file with mode: 0644]
frameworks/qt5/qt5base/Makefile

diff --git a/frameworks/qt5/qt5base/Config.in b/frameworks/qt5/qt5base/Config.in
new file mode 100644 (file)
index 0000000..11cc3a5
--- /dev/null
@@ -0,0 +1,6 @@
+config BUILD_qt5base-core_INOTIFY
+    bool "Use native inotify support on Linux"
+    depends on PACKAGE_qt5base-core
+    default y
+    help
+        Compiles qt5's QFileSystemWatcher with support for inotify on Linux. Otherwise QFileSystemWatcher uses polling as fallback."
index 91c707495ed20643890a3defd18813dd1f0b1f16..020f102f5e881340037212923093958c2fb22b7d 100644 (file)
@@ -56,6 +56,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_qt5base-plugin-platforms-minimal \
        CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
        CONFIG_PACKAGE_qt5base-plugin-input-libinput \
+       CONFIG_BUILD_qt5base-core_INOTIFY \
 #      CONFIG_PACKAGE_qt5base-plugin-imageformats-png \
 #      CONFIG_PACKAGE_qt5base-plugin-platforms-eglfs \
 #      CONFIG_PACKAGE_qt5base-plugin-platforms-minimalegl \
@@ -91,6 +92,10 @@ define Package/qt5base-core
   DEPENDS+=+libpthread +zlib +libzstd +libpcre2-16 +libstdcpp +librt +libdouble-conversion $(ICONV_DEPENDS) +PACKAGE_icu:icu #FIXME: do not include ICONV_DEPENDS if ICU is selected (though, that's only an issue when using GNU iconv)
 endef
 
+define Package/qt5base-core/config
+        source "$(SOURCE)/Config.in"
+endef
+
 define Package/qt5base-concurrent
   $(call Package/qt5base/Default)
   TITLE+=concurrent
@@ -352,7 +357,7 @@ define Build/Configure
                        --doubleconversion=system \
                        --glib=no \
                        --eventfd=no \
-                       --inotify=no \
+                       --inotify=$(if $(CONFIG_BUILD_qt5base-core_INOTIFY),yes,no) \
                        --iconv=$(if $(CONFIG_BUILD_NLS),$(if $(CONFIG_LIBC_USE_GLIBC)$(CONFIG_LIBC_USE_MUSL),posix)$(if $(CONFIG_LIBC_USE_UCLIBC),gnu),no) \
                        --icu=$(if $(CONFIG_PACKAGE_icu),yes,no) \
                        --pcre=system \